home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / Include / FWFrame.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  30.2 KB  |  837 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWFrame.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWFRAME_H
  11. #define FWFRAME_H
  12.  
  13. #ifndef FWEVENT_H
  14. #include "FWEvent.h"
  15. #endif
  16.  
  17. #ifndef FWPRTDEF_H
  18. #include "FWPrtDef.h"
  19. #endif
  20.  
  21. #ifndef FWSVIEW_H
  22. #include "FWSView.h"
  23. #endif
  24.  
  25. #ifndef FWUTIL_H
  26. #include "FWUtil.h"
  27. #endif
  28.  
  29. #ifndef FWDRGDRP_H
  30. #include "FWDrgDrp.h"
  31. #endif
  32.  
  33. // ----- OS Includes -----
  34.  
  35. #ifndef FWRECT_H
  36. #include "FWRect.h"
  37. #endif
  38.  
  39. #ifndef FWFCTINF_H
  40. #include "FWFctInf.h"
  41. #endif
  42.  
  43. #ifndef FWACQUIR_H
  44. #include "FWAcquir.h"
  45. #endif
  46.  
  47. #ifndef FWICON_H
  48. #include "FWIcon.h"
  49. #endif
  50.  
  51. // ----- Foundation Includes -----
  52.  
  53. #ifndef FWRUNTYP_H
  54. #include "FWRunTyp.h"
  55. #endif
  56.  
  57. #ifndef FWSTDDEF_H
  58. #include "FWStdDef.h"
  59. #endif
  60.  
  61. #ifndef FWSTRING_H
  62. #include "FWString.h"
  63. #endif
  64.  
  65. // ----- OpenDoc Includes -----
  66.  
  67. #ifndef SOM_ODFrame_xh
  68. #include <Frame.xh>
  69. #endif
  70.  
  71. #ifndef FWODTYPS_H
  72. #include "FWODTyps.h"
  73. #endif
  74.  
  75. #ifndef SOM_ODStorageUnit_xh
  76. #include <StorageU.xh>
  77. #endif
  78.  
  79. //========================================================================================
  80. //    Forward Declaration
  81. //========================================================================================
  82.  
  83. class ODFacet;
  84. class ODWindow;
  85. class ODShape;
  86. class ODFocusSet;
  87. class ODStorageUnitView;
  88.  
  89. class FW_CPart;
  90. class FW_CMenuBar;
  91. class FW_CMenuEvent;
  92. class FW_CWindow;
  93. class FW_CGraphicDevice;
  94. class FW_CFacetContext;
  95. class FW_CMouseEvent;
  96. class FW_CActivateEvent;
  97. class FW_CClipboardCommand;
  98. class FW_CPresentation;
  99. class FW_CResumeSuspendEvent;
  100. class FW_CCloneInfo;
  101. class FW_CViewAs;
  102. class FW_CInterest;
  103. class FW_CPrintHandler;
  104. class FW_CScrollingViewIterator;
  105. class FW_CIdler;
  106. class FW_CScroller;
  107. class FW_MDraggableFrame;
  108. class FW_MDroppableFrame;
  109. class FW_CButton;
  110.  
  111. //========================================================================================
  112. //    class FW_CFrame
  113. //========================================================================================
  114.  
  115. class FW_CFrame : public FW_CSuperView
  116. {
  117. public:
  118.     FW_DECLARE_CLASS
  119.     FW_DECLARE_AUTO(FW_CFrame)
  120.  
  121.     friend class FW_CPart;
  122.     friend class FW_CIdler;
  123.  
  124. //----------------------------------------------------------------------------------------
  125. //    Constructors/Destructors
  126. //
  127. public:
  128.     FW_CFrame(Environment*            ev,
  129.                 ODFrame*             frame, 
  130.                 FW_CPresentation*     presentation,
  131.                 FW_CPart*             part,
  132.                 FW_ResourceId        id = 0);            
  133.     virtual ~ FW_CFrame();
  134.  
  135. //----------------------------------------------------------------------------------------
  136. //    API from ODFrame (some are just inlines)
  137. //
  138. public:
  139.     ODID                        GetFrameGroup(Environment* ev) const;
  140.     ODID                        GetSequenceNumber(Environment* ev) const;
  141.  
  142.     FW_Boolean                    IsPersistent(Environment* ev) const;
  143.                         
  144.     FW_Boolean                    IsRoot(Environment* ev) const;
  145.  
  146.     FW_Boolean                    IsSubframe(Environment* ev) const;
  147.     void                        SetSubframe(Environment* ev, 
  148.                                     FW_Boolean isSubframe);
  149.  
  150.     FW_Boolean                    IsOverlaid(Environment* ev) const;
  151.  
  152.     FW_Boolean                    IsInLimbo(Environment* ev) const;
  153.     
  154.     FW_Boolean                    IsFrozen(Environment* ev) const;
  155.     void                        SetFrozen(Environment* ev, 
  156.                                     FW_Boolean isFrozen);
  157.  
  158.     FW_Boolean                    DoesPropagateEvents(Environment* ev) const;
  159.     void                        SetPropagateEvents(Environment* ev, 
  160.                                     FW_Boolean doesPropagateEvents);
  161.  
  162.     FW_CPresentation*            GetPresentation(Environment* ev) const;
  163.     ODTypeToken                    GetViewType(Environment* ev) const;
  164.  
  165.     void                        ChangeUsedShape(Environment* ev, 
  166.                                     ODShape* newUsedShape, 
  167.                                     ODCanvas* biasCanvas = NULL);
  168.     FW_Boolean                    RequestFrameShape(Environment* ev, 
  169.                                     ODShape* shape,
  170.                                     ODCanvas* biasCanvas = NULL);
  171.  
  172.     ODShape*                    AcquireUsedShape(Environment* ev, 
  173.                                     ODCanvas* biasCanvas = NULL) const;    
  174.     ODTransform*                AcquireInternalTransform(Environment* ev, 
  175.                                     ODCanvas* biasCanvas = NULL) const;    
  176.     ODShape*                    AcquireFrameShape(Environment* ev, 
  177.                                     ODCanvas* biasCanvas = NULL) const;
  178.  
  179.     ODFrame*                    AcquireContainingFrame(Environment* ev) const;
  180.     
  181.     ODWindow*                    AcquireODWindow(Environment* ev) const;
  182.  
  183.     ODID                        GetID(Environment* ev) const;
  184.     
  185.     void                        ChangeInternalTransform(Environment* ev, 
  186.                                     ODTransform* internalTransform,
  187.                                     ODCanvas* biasCanvas = NULL);
  188.                                     
  189. //----------------------------------------------------------------------------------------
  190. //    Inherited from FW_MEventHandler
  191. //
  192. public:
  193.     // ----- Events -----
  194.     virtual FW_MEventHandler*    GetTarget(Environment* ev) const;
  195.     virtual void                SetTarget(Environment* ev, FW_MEventHandler* theTarget);
  196.     virtual FW_Boolean            WantsToBeTarget(Environment* ev);
  197.     virtual FW_Boolean             HandleIdle(Environment* ev, const FW_CNullEvent& theNullEvent);
  198.  
  199.     // ----- Menus -----
  200.     virtual FW_Boolean            HandleAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
  201.     virtual FW_Boolean             HandleMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
  202.  
  203. //----------------------------------------------------------------------------------------
  204. //    Inherited from FW_CSuperView
  205. //
  206. public:
  207.     virtual void                SetLocation(Environment* ev, const FW_CPoint& location, FW_Boolean redraw = TRUE);
  208.     virtual void                HandleActivateEvent(Environment* ev, const FW_CActivateEvent& theActivateEvent);    
  209.  
  210. //----------------------------------------------------------------------------------------
  211. //    New API
  212. //
  213. public:
  214.     // ----- Drag and Drop -----
  215.     FW_MDraggableFrame*            GetDraggable(Environment* ev) const;
  216.     FW_MDroppableFrame*            GetDroppable(Environment* ev) const;
  217.  
  218.     FW_Boolean                    IsTopFrame(Environment* ev) const;
  219.     
  220.     static FW_CFrame*             ODtoFWFrame(Environment* ev, ODFrame* odFrame);
  221.     ODFrame*                    GetODFrame(Environment *ev) const;
  222.  
  223.     FW_Boolean                    IsSiblingFrameOf(Environment *ev, ODFrame* otherODFrame) const;
  224.     FW_Boolean                    HasSamePartEditorAs(Environment *ev, ODFrame* otherODFrame) const;
  225.  
  226.     // ----- Mouse Tracking -----
  227.     virtual FW_Boolean            AdjustCursor(Environment* ev, ODFacet* odFacet, const FW_CPoint& theMousePoint);
  228.     FW_Boolean                    HandleMouseEnter(Environment* ev, ODFacet* odFacet, const FW_CPoint& where);
  229.     FW_Boolean                    HandleMouseLeave(Environment* ev, ODFacet* odFacet);
  230.     FW_Boolean                    HandleMouseWithin(Environment* ev, ODFacet* odFacet, const FW_CPoint& theMousePoint);
  231.         
  232.     // ----- Events ------
  233.     FW_Boolean                    HandleSuspendResumeEvent(Environment* ev, const FW_CSuspendResumeEvent& theResumeSuspendEvent);
  234. #ifdef FW_BUILD_MAC
  235.     FW_Boolean                    HandleWindowEvent(Environment* ev, const FW_CMacWindowEvent& windowEvent);
  236. #endif
  237.     
  238.     // ----- Facet Management -----        
  239.     virtual void                 FacetAdded(Environment* ev, ODFacet* odFacet, unsigned short facetCount);
  240.     virtual void                 FacetRemoved(Environment* ev, ODFacet* odFacet, unsigned short facetCount);
  241.  
  242.     unsigned short                GetFacetCount(Environment* ev) const;
  243.     
  244.     // ----- Display Properties -----
  245.     virtual void                ContainingPartPropertiesUpdated(Environment *ev, ODStorageUnit* propertyUnit);
  246.         
  247.     // ----- Add/Remove frame notification -----
  248.     virtual void                FrameAdded(Environment* ev, ODFrame* odFrame, FW_Boolean fromStorage);
  249.     virtual void                FrameRemoved(Environment* ev, FW_Boolean toStorage);
  250.         
  251.     // ----- Focus Management -----
  252.     virtual void                 FocusStateChanged(Environment* ev, ODTypeToken focus, FW_Boolean newState, ODFrame* newOwner);    
  253.     virtual FW_Boolean            BeginRelinquishFocus(Environment *ev, ODTypeToken focus, ODFrame* proposedFrame);
  254.     virtual void                AbortRelinquishFocus(Environment *ev, ODTypeToken focus, ODFrame* proposedFrame);
  255.     virtual ODFocusSet*            GetFocusSet(Environment* ev) const;    
  256.     
  257.     virtual    void                RelinquishFocusSet(Environment *ev);
  258.     virtual FW_Boolean            RequestFocusSet(Environment *ev);
  259.         
  260.     // ----- Window Geometry -----
  261.     virtual void                AdjustZoomedWindowSize(Environment *ev, FW_CPoint& proposedSize);
  262.     virtual void                AdjustWindowGrowLimits(Environment *ev, FW_CPoint& minSize, FW_CPoint& maxSize);
  263.  
  264.     // ----- Menus -----
  265.     virtual void                InstallMenus(Environment* ev);
  266.     
  267.     // ----- ViewType/Presentation/Sequence -----
  268.     virtual void                 ViewTypeChanged(Environment* ev, ODTypeToken newViewType, ODTypeToken oldViewType);
  269.     virtual void                 PresentationChanged(Environment* ev);
  270.     virtual void                 SequenceChanged(Environment* ev);
  271.  
  272.     // ----- Frame Geometry -----
  273.     virtual void                 FrameShapeChanged(Environment* ev);
  274.     virtual void                GeometryChanged(Environment *ev,
  275.                                             ODFacet* odFacet,
  276.                                             FW_Boolean clipShapeChanged,
  277.                                             FW_Boolean externalTransformChanged);
  278.     
  279.     // ----- Requested Frame -----
  280.     FW_Boolean                    IsRequestedFrame(Environment* ev) const;
  281.                                  
  282.     // ----- Used and Update Shape -----
  283.     void                         UpdateUsedAndActiveShapes(Environment* ev);
  284.     void                        UpdateUsedShape(Environment* ev);
  285.     void                        UpdateActiveShape(Environment* ev, ODFacet* facet);
  286.  
  287.     virtual ODShape*             AdjustUsedShape(Environment* ev, ODShape* suggestedUsedShape);
  288.     virtual ODShape*             AdjustActiveShape(Environment* ev, ODFacet* facet, ODShape* suggestedActiveShape);
  289.     
  290.     // ----- Window -----
  291.     FW_CWindow*                    GetWindow(Environment* ev) const;
  292.     virtual FW_CWindow*         NewPartWindow(Environment* ev, ODFacet* facet);
  293.     
  294.     // ----- Focus -----
  295.     FW_Boolean                    HasSelectionFocus(Environment* ev) const;
  296.     FW_Boolean                    HasModalFocus(Environment* ev) const;
  297.     
  298.     // ----- Getter/Setter -----
  299.     FW_CPart*                     GetPart(Environment* ev) const;
  300.     ODPart*                     GetODPart(Environment* ev) const;
  301.  
  302.     FW_CSuperView*                GetContentView(Environment* ev) const;
  303.     void                         SetContentView(Environment* ev, FW_CSuperView* view);
  304.     
  305.     FW_Boolean                    GetFrontClicks(Environment* ev) const;
  306.     void                        SetFrontClicks(Environment* ev, FW_Boolean getFrontClicks);
  307.  
  308.     ODFacet*                     GetActiveFacet(Environment* ev) const;
  309.     virtual void                SetActiveFacet(Environment* ev, ODFacet* activeFacet);
  310.         
  311.     virtual FW_Boolean            CanBeActiveFrame(Environment* ev) const;
  312.     void                        SetCanBeActiveFrame(Environment* ev, FW_Boolean beActive);
  313.     
  314.     FW_CFrame*                    GetSourceFrame(Environment* ev);
  315.  
  316.     // ----- Cloning -----
  317.     virtual void                ClonePartInfo(Environment* ev, 
  318.                                     ODDraftKey key,
  319.                                     ODInfoType partInfo,
  320.                                     ODStorageUnitView* storageUnitView,
  321.                                     ODFrame* scope);
  322.  
  323.     // ----- Scrolling -----
  324.     FW_CScroller*                GetScroller(Environment* ev) const;
  325.     void                        AdoptScroller(Environment* ev, FW_CScroller* scroller);
  326.  
  327.     // ----- Clipboard -----
  328.     FW_Boolean                    HasPropertyOnClipboard(Environment* ev, 
  329.                                     ODPropertyName propertyName, 
  330.                                     ODValueType type);
  331.         
  332.     // ----- Rendering -----
  333.     virtual FW_Boolean            HandleDraw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);    
  334.     virtual void                 Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
  335.     
  336.     virtual void                HighlightChanged(Environment* ev, ODFacet* odFacet);
  337.     virtual void                DrawHighlight(Environment *ev, ODFacet* facet, ODHighlight hilite, ODShape* invalidShape);
  338.     
  339.     // ----- View As -----
  340.     virtual void                BuildThumbnail(Environment* ev, FW_CGraphicContext& gc, FW_CRect& usedRect);
  341.     virtual FW_CIcon            GetIcon(Environment* ev, short iconSize) const;
  342.     
  343.     // ----- Content -----
  344.     void                        GetContentExtent(Environment* ev, FW_CPoint& extent) const;
  345.     ODShape*                     AcquireContentShape(Environment *ev);
  346.     
  347.     // ----- Commands/Undo -----
  348.     virtual FW_CClipboardCommand*    NewClipboardCommand(Environment* ev, ODCommandID commandID);
  349.         // Override to return a subclass of FW_CClipboardCommand
  350.     
  351.     // ----- Printing ------
  352.     virtual FW_CPrintHandler*    NewPrintHandler(Environment* ev);
  353.  
  354.     // ----- Persistence -----
  355.     virtual void                InternalizeFrame(Environment* ev, ODStorageUnitView* storageUnitView);
  356.     virtual void                ExternalizeFrame(Environment* ev, ODStorageUnitView* storageUnitView);
  357.  
  358. private:
  359. #ifdef FW_BUILD_WIN
  360.     void                        CreateShadowWindow(Environment* ev);
  361.     static LRESULT CALLBACK     ShadowWindowProc(HWND hWnd, UINT msg,
  362.                                              WPARAM wParam, LPARAM lParam);
  363.     void                        MoveSizeShadowWindow(Environment* ev);
  364.     
  365. public:
  366.     ODPlatformWindow            GetShadowWindow(Environment* ev) const;
  367. #endif
  368.  
  369. //----------------------------------------------------------------------------------------
  370. //    Internal API
  371. //
  372. protected:
  373.     virtual void                PrivCreateSubViewsFromStream(Environment* ev, FW_CReadableStream& stream);
  374.     void                        PrivGetFrameShapeBounds(Environment* ev, FW_CRect& rect) const;
  375.         
  376. #ifdef FW_BUILD_MAC
  377.      void                         PrivMacInGrowBox(Environment* ev, const FW_CMacWindowEvent& windowEvent);
  378. #endif
  379.  
  380.     // ----- Focus handling -----
  381.     void                        PrivRelinquishFocusSet(Environment* ev);
  382.     FW_Boolean                    PrivRequestFocusSet(Environment* ev);
  383.  
  384. public:    
  385.     virtual void                PrivDragging(Environment *ev, FW_Boolean state);
  386.  
  387.     void                         PrivActivateFrame(Environment* ev, ODFacet* activatedFacet);
  388.     virtual void                PrivAttachSourceFrame(Environment* ev, FW_CFrame* sourceFrame);
  389.  
  390.     FW_EInternalizeResult        PrivHandleInternalizeScrap(Environment* ev, ODStorageUnit* sourceSU, ODCloneKind cloneKind);
  391.     void                        PrivHandleExternalizeScrap(Environment* ev, FW_EStorageKinds storageKind, ODStorageUnit* destinationSU, ODCloneKind cloneKind);
  392.  
  393.     FW_Boolean                    PrivActiveWindowOnMouseDown(Environment* ev, ODFacet* facet, FW_Boolean clickedInFrame);
  394.     FW_CWindow*                    PrivCreateWindow(Environment* ev, ODWindow* odWindow);
  395.  
  396.     ODTypeToken                    PrivGetPreviousViewType(Environment *ev) const;
  397.     void                        PrivSetPreviousViewType(Environment *ev, ODTypeToken viewType);
  398.  
  399.     void                        PrivCreateViewAs(Environment* ev);
  400.  
  401.     void                        PrivContentViewLocationChanged(Environment* ev, const FW_CPoint& newLocation);
  402.     void                        PrivRealignInternalTransform(Environment* ev);
  403.     
  404.     FW_Boolean                    PrivInSharedWindow(Environment *ev) const;
  405.     
  406.     void                        PrivFacetAdded(Environment *ev, ODFacet* facet);
  407.     void                        PrivFacetRemoved(Environment *ev, ODFacet* facet);
  408.     
  409.     void                        PrivSetDraggable(Environment *ev, FW_MDraggableFrame* draggable);
  410.     void                        PrivSetDroppable(Environment *ev, FW_MDroppableFrame* droppable, FW_Boolean isDroppable);
  411.     
  412.     void                        PrivSetDragPending(Environment *ev, FW_Boolean pending);
  413.     
  414.     void                        PrivUpdateScrollParameters(Environment *ev, FW_Boolean notify = TRUE);
  415.     FW_CPoint                    PrivGetContentViewOffset(Environment* ev) const;
  416.  
  417.     void                        PrivSetRequestedFrame(Environment *ev);
  418.     
  419.     FW_DroppableState            PrivGetDroppableState() const;
  420.     void                        PrivSetDroppableState(FW_DroppableState droppableState);
  421.  
  422.     FW_Boolean                     PrivSubViewsCreated(Environment*);
  423.     
  424.     virtual void                PrivButtonAttached(Environment *ev, FW_CButton* button);
  425.  
  426. //----------------------------------------------------------------------------------------
  427. //    Data Members
  428. //
  429. private:
  430.     ODStorageUnitID             fFrameID;                // Id for this display frame
  431.     ODFrame*                    fODFrame;                // OpenDoc frame
  432.     FW_CPart*                    fPart;
  433.     FW_ResourceId                fResourceId;            // 0 if views not created from resources
  434.  
  435.     FW_MEventHandler*            fTarget;                // For key/menu/idle events, never NULL
  436.       FW_CSuperView*                fContentView;              // View displaying the content (or frame itself)
  437.     FW_Boolean                    fGetFrontClicks;
  438.     FW_Boolean                    fNeedsFoci;                // To remember active frame during activate/deactivate events
  439.     FW_Boolean                    fHasSelectionFocus;        // TRUE when frame has the selection focus
  440.     ODFacet*                    fActiveFacet;            // Active facet for this frame
  441.     FW_Boolean                    fCanBeActiveFrame;        // FALSE for floating window frames
  442.     FW_CPresentation*            fPresentation;
  443.     FW_CWindow*                    fWindow;
  444.     unsigned short                fFacetCount;
  445.     ODTypeToken                    fPreviousViewType;
  446.     FW_CViewAs*                    fViewAs;
  447.     FW_CIdler*                    fIdler;
  448.     
  449.     FW_MDraggableFrame*            fDraggable;
  450.     FW_MDroppableFrame*            fDroppable;
  451.     FW_DroppableState            fDroppableState;
  452.     
  453.     FW_CScroller*                fScroller;
  454.     
  455.     FW_CView*                    fViewUnderCursor;        // To handle MouseEnter/Within/Leave events
  456.     FW_Boolean                    fRequestedFrame;        // TRUE if the frame has been gotton thru RequestEmbeddedFrame
  457.     FW_Boolean                    fInSharedWindow;        // [HLX] hack for shared window
  458. #ifdef FW_BUILD_WIN
  459.     ODPlatformWindow            fShadowWindow;
  460. #endif
  461.     FW_Boolean                    fInternalTransformRealigmentNeeded;
  462.     FW_CPoint                    fContentViewOffset;        // content view location in frame coordinates
  463.     FW_Boolean                    fSubViewsCreated;        // FALSE initialy. TRUE the first time subviews are created.
  464.     FW_CFrame*                    fSourceFrame;            
  465. };
  466.  
  467.  
  468. //========================================================================================
  469. //    Inlines
  470. //========================================================================================
  471.  
  472. //----------------------------------------------------------------------------------------
  473. // FW_CFrame::PrivGetContentViewOffset
  474. //----------------------------------------------------------------------------------------
  475. inline FW_CPoint FW_CFrame::PrivGetContentViewOffset(Environment*) const
  476. {
  477.     return fContentViewOffset;
  478. }
  479.  
  480. //----------------------------------------------------------------------------------------
  481. //    FW_CFrame::GetDraggable
  482. //----------------------------------------------------------------------------------------
  483. inline FW_MDraggableFrame* FW_CFrame::GetDraggable(Environment*) const
  484. {
  485.     return fDraggable;
  486. }
  487.  
  488. //----------------------------------------------------------------------------------------
  489. //    FW_CFrame::GetDroppable
  490. //----------------------------------------------------------------------------------------
  491. inline FW_MDroppableFrame* FW_CFrame::GetDroppable(Environment*) const
  492. {
  493.     return fDroppable;
  494. }
  495.  
  496. //----------------------------------------------------------------------------------------
  497. //    FW_CFrame::PrivSetDraggable
  498. //----------------------------------------------------------------------------------------
  499. inline void FW_CFrame::PrivSetDraggable(Environment*, FW_MDraggableFrame* draggable)
  500. {
  501.     fDraggable = draggable;
  502. }
  503.     
  504. //----------------------------------------------------------------------------------------
  505. //    FW_CFrame::GetFacetCount
  506. //----------------------------------------------------------------------------------------
  507. inline unsigned short FW_CFrame::GetFacetCount(Environment*) const
  508. {
  509.     return fFacetCount;
  510. }
  511.  
  512. //----------------------------------------------------------------------------------------
  513. //    FW_CFrame::PrivInSharedWindow
  514. //----------------------------------------------------------------------------------------
  515. inline FW_Boolean FW_CFrame::PrivInSharedWindow(Environment*) const
  516. {
  517.     return fInSharedWindow;
  518. }
  519.  
  520. //----------------------------------------------------------------------------------------
  521. //    FW_CFrame::GetFrontClicks
  522. //----------------------------------------------------------------------------------------
  523. inline FW_Boolean FW_CFrame::GetFrontClicks(Environment*) const
  524. {
  525.     return fGetFrontClicks;
  526. }
  527.  
  528. //----------------------------------------------------------------------------------------
  529. //    FW_CFrame::SetFrontClicks
  530. //----------------------------------------------------------------------------------------
  531. inline void FW_CFrame::SetFrontClicks(Environment*, FW_Boolean getFrontClicks)
  532. {
  533.     fGetFrontClicks = getFrontClicks;
  534. }
  535.  
  536. //----------------------------------------------------------------------------------------
  537. //    FW_CFrame::GetPart
  538. //----------------------------------------------------------------------------------------
  539. inline FW_CPart* FW_CFrame::GetPart(Environment*) const
  540. {
  541.     return fPart;
  542. }
  543.  
  544. //----------------------------------------------------------------------------------------
  545. //    FW_CFrame::GetScroller
  546. //----------------------------------------------------------------------------------------
  547. inline FW_CScroller* FW_CFrame::GetScroller(Environment*) const
  548. {
  549.     return fScroller;
  550. }
  551.  
  552. //----------------------------------------------------------------------------------------
  553. //    FW_CFrame::GetContentView
  554. //----------------------------------------------------------------------------------------
  555. inline FW_CSuperView* FW_CFrame::GetContentView(Environment*) const
  556. {
  557.     return (fContentView == NULL) ? (FW_CSuperView*)this : fContentView;
  558. }
  559.  
  560. //----------------------------------------------------------------------------------------
  561. //    FW_CFrame::GetActiveFacet
  562. //----------------------------------------------------------------------------------------
  563. inline ODFacet* FW_CFrame::GetActiveFacet(Environment*) const
  564. {
  565.     return fActiveFacet;
  566. }
  567.  
  568. //----------------------------------------------------------------------------------------
  569. //    FW_CFrame::SetCanBeActiveFrame
  570. //----------------------------------------------------------------------------------------
  571. inline void FW_CFrame::SetCanBeActiveFrame(Environment*, FW_Boolean beActive)
  572. {
  573.     fCanBeActiveFrame = beActive;
  574. }
  575.  
  576. //----------------------------------------------------------------------------------------
  577. //    FW_CFrame::ChangeUsedShape
  578. //----------------------------------------------------------------------------------------
  579. inline void FW_CFrame::ChangeUsedShape(Environment* ev, ODShape* newUsedShape, ODCanvas* biasCanvas)
  580. {
  581.     fODFrame->ChangeUsedShape(ev, newUsedShape, biasCanvas);
  582. }
  583.  
  584. //----------------------------------------------------------------------------------------
  585. //    FW_CFrame::GetODFrame
  586. //----------------------------------------------------------------------------------------
  587. inline ODFrame* FW_CFrame::GetODFrame(Environment*) const
  588. {
  589.     return fODFrame;
  590. }
  591.  
  592. //----------------------------------------------------------------------------------------
  593. //    FW_CFrame::PrivGetPreviousViewType
  594. //----------------------------------------------------------------------------------------
  595. inline ODTypeToken FW_CFrame::PrivGetPreviousViewType(Environment*) const
  596. {
  597.     return fPreviousViewType;
  598. }
  599.  
  600. //----------------------------------------------------------------------------------------
  601. //    FW_CFrame::PrivSetPreviousViewType
  602. //----------------------------------------------------------------------------------------
  603. inline void FW_CFrame::PrivSetPreviousViewType(Environment*, ODTypeToken viewType)
  604. {
  605.     fPreviousViewType = viewType;
  606. }
  607.  
  608. //----------------------------------------------------------------------------------------
  609. //    FW_CFrame::GetFrameGroup
  610. //----------------------------------------------------------------------------------------
  611. inline ODID FW_CFrame::GetFrameGroup(Environment* ev) const
  612. {
  613.     return fODFrame->GetFrameGroup(ev);
  614. }
  615.  
  616. //----------------------------------------------------------------------------------------
  617. //    FW_CFrame::GetSequenceNumber
  618. //----------------------------------------------------------------------------------------
  619. inline ODID FW_CFrame::GetSequenceNumber(Environment* ev) const
  620. {
  621.     return fODFrame->GetSequenceNumber(ev);
  622. }
  623.  
  624. //----------------------------------------------------------------------------------------
  625. //    FW_CFrame::IsRoot
  626. //----------------------------------------------------------------------------------------
  627. inline FW_Boolean FW_CFrame::IsRoot(Environment* ev) const
  628. {
  629.     return fODFrame->IsRoot(ev);
  630. }
  631.  
  632. //----------------------------------------------------------------------------------------
  633. //    FW_CFrame::HasSelectionFocus
  634. //----------------------------------------------------------------------------------------
  635. inline FW_Boolean FW_CFrame::HasSelectionFocus(Environment*) const
  636. {
  637.     return fHasSelectionFocus;
  638. }
  639.  
  640. //----------------------------------------------------------------------------------------
  641. //    FW_CFrame::IsPersistent
  642. //----------------------------------------------------------------------------------------
  643. inline FW_Boolean FW_CFrame::IsPersistent(Environment* ev) const
  644. {
  645.     return fODFrame->GetStorageUnit(ev) != NULL;
  646. }
  647.  
  648. //----------------------------------------------------------------------------------------
  649. //    FW_CFrame::IsOverlaid
  650. //----------------------------------------------------------------------------------------
  651. inline FW_Boolean FW_CFrame::IsOverlaid(Environment* ev) const
  652. {
  653.     return fODFrame->IsOverlaid(ev);
  654. }
  655.  
  656. //----------------------------------------------------------------------------------------
  657. //    FW_CFrame::IsInLimbo
  658. //----------------------------------------------------------------------------------------
  659. inline FW_Boolean FW_CFrame::IsInLimbo(Environment* ev) const
  660. {
  661.     return FW_IsInLimbo(ev, fODFrame);
  662. }
  663.  
  664. //----------------------------------------------------------------------------------------
  665. //    FW_CFrame::IsFrozen
  666. //----------------------------------------------------------------------------------------
  667. inline FW_Boolean FW_CFrame::IsFrozen(Environment* ev) const
  668. {
  669.     return fODFrame->IsFrozen(ev);
  670. }
  671.  
  672. //----------------------------------------------------------------------------------------
  673. //    FW_CFrame::SetFrozen
  674. //----------------------------------------------------------------------------------------
  675. inline void FW_CFrame::SetFrozen(Environment* ev, FW_Boolean isFrozen)
  676. {
  677.     fODFrame->SetFrozen(ev, isFrozen);
  678. }
  679.  
  680. //----------------------------------------------------------------------------------------
  681. //    FW_CFrame::DoesPropagateEvents
  682. //----------------------------------------------------------------------------------------
  683. inline FW_Boolean FW_CFrame::DoesPropagateEvents(Environment* ev) const
  684. {
  685.     return fODFrame->DoesPropagateEvents(ev);
  686. }
  687.  
  688. //----------------------------------------------------------------------------------------
  689. //    FW_CFrame::SetPropagateEvents
  690. //----------------------------------------------------------------------------------------
  691. inline void FW_CFrame::SetPropagateEvents(Environment* ev, FW_Boolean doesPropagateEvents)
  692. {
  693.     fODFrame->SetPropagateEvents(ev, doesPropagateEvents);
  694. }
  695.  
  696. //----------------------------------------------------------------------------------------
  697. //    FW_CFrame::GetViewType
  698. //----------------------------------------------------------------------------------------
  699. inline ODTypeToken FW_CFrame::GetViewType(Environment* ev) const
  700. {
  701.     return fODFrame->GetViewType(ev);
  702. }
  703.  
  704. //----------------------------------------------------------------------------------------
  705. //    FW_CFrame::GetPresentation
  706. //----------------------------------------------------------------------------------------
  707. inline FW_CPresentation* FW_CFrame::GetPresentation(Environment*) const
  708. {
  709.     return fPresentation;
  710. }
  711.  
  712. //----------------------------------------------------------------------------------------
  713. //    FW_CFrame::IsSubframe
  714. //----------------------------------------------------------------------------------------
  715. inline FW_Boolean FW_CFrame::IsSubframe(Environment* ev) const
  716. {
  717.     return fODFrame->IsSubframe(ev);
  718. }
  719.  
  720. //----------------------------------------------------------------------------------------
  721. //    FW_CFrame::SetSubframe
  722. //----------------------------------------------------------------------------------------
  723. inline void FW_CFrame::SetSubframe(Environment* ev, FW_Boolean isSubframe)
  724. {
  725.     fODFrame->SetSubframe(ev, isSubframe);
  726. }
  727.  
  728. //----------------------------------------------------------------------------------------
  729. //    FW_CFrame::AcquireUsedShape
  730. //----------------------------------------------------------------------------------------
  731. inline ODShape* FW_CFrame::AcquireUsedShape(Environment* ev, ODCanvas* biasCanvas) const
  732. {
  733.     return fODFrame->AcquireUsedShape(ev, biasCanvas);
  734. }
  735.  
  736. //----------------------------------------------------------------------------------------
  737. //    FW_CFrame::AcquireFrameShape
  738. //----------------------------------------------------------------------------------------
  739. inline ODShape* FW_CFrame::AcquireFrameShape(Environment* ev, ODCanvas* biasCanvas) const
  740. {
  741.     return fODFrame->AcquireFrameShape(ev, biasCanvas);
  742. }
  743.  
  744. //----------------------------------------------------------------------------------------
  745. //    FW_CFrame::AcquireContainingFrame
  746. //----------------------------------------------------------------------------------------
  747. inline ODFrame* FW_CFrame::AcquireContainingFrame(Environment* ev) const
  748. {
  749.     return fODFrame->AcquireContainingFrame(ev);
  750. }
  751.  
  752. //----------------------------------------------------------------------------------------
  753. //    FW_CFrame::AcquireInternalTransform
  754. //----------------------------------------------------------------------------------------
  755. inline ODTransform* FW_CFrame::AcquireInternalTransform(Environment* ev, ODCanvas* biasCanvas) const
  756. {
  757.     return fODFrame->AcquireInternalTransform(ev, biasCanvas);
  758. }
  759.  
  760. //----------------------------------------------------------------------------------------
  761. //    FW_CFrame::AcquireODWindow
  762. //----------------------------------------------------------------------------------------
  763. inline ODWindow* FW_CFrame::AcquireODWindow(Environment* ev) const
  764. {
  765.     return fODFrame->AcquireWindow(ev);
  766. }
  767.  
  768. //----------------------------------------------------------------------------------------
  769. //    FW_CFrame::GetID
  770. //----------------------------------------------------------------------------------------
  771. inline ODID FW_CFrame::GetID(Environment*) const
  772. {
  773.     return fFrameID;
  774. }
  775.  
  776. #ifdef FW_BUILD_WIN
  777. //----------------------------------------------------------------------------------------
  778. //    FW_CFrame::GetShadowWindow
  779. //----------------------------------------------------------------------------------------
  780. inline ODPlatformWindow FW_CFrame::GetShadowWindow(Environment*) const
  781. {
  782.     return fShadowWindow;
  783. }
  784. #endif
  785.  
  786. //----------------------------------------------------------------------------------------
  787. // FW_CFrame::PrivSetRequestedFrame
  788. //----------------------------------------------------------------------------------------
  789. inline void FW_CFrame::PrivSetRequestedFrame(Environment*)
  790. {
  791.     fRequestedFrame = TRUE;
  792. }
  793.  
  794. //----------------------------------------------------------------------------------------
  795. // FW_CFrame::IsRequestedFrame
  796. //----------------------------------------------------------------------------------------
  797. inline FW_Boolean FW_CFrame::IsRequestedFrame(Environment*) const
  798. {
  799.     return fRequestedFrame;
  800. }
  801.  
  802. //----------------------------------------------------------------------------------------
  803. // FW_CFrame::GetSourceFrame
  804. //----------------------------------------------------------------------------------------
  805. inline FW_CFrame* FW_CFrame::GetSourceFrame(Environment*)
  806. {
  807.     return fSourceFrame;
  808. }
  809.  
  810. //----------------------------------------------------------------------------------------
  811. // FW_CFrame::PrivGetDroppableState
  812. //----------------------------------------------------------------------------------------
  813. inline FW_DroppableState FW_CFrame::PrivGetDroppableState() const
  814. {
  815.     return fDroppableState;
  816. }
  817.  
  818. //----------------------------------------------------------------------------------------
  819. // FW_CFrame::PrivSetDroppableState
  820. //----------------------------------------------------------------------------------------
  821. inline void FW_CFrame::PrivSetDroppableState(FW_DroppableState droppableState)
  822. {
  823.     fDroppableState = droppableState;
  824. }
  825.  
  826. //----------------------------------------------------------------------------------------
  827. // FW_CFrame::PrivSubViewsCreated
  828. //----------------------------------------------------------------------------------------
  829. inline FW_Boolean FW_CFrame::PrivSubViewsCreated(Environment*)
  830. {
  831.     return fSubViewsCreated;
  832. }
  833.  
  834.  
  835. #endif
  836.  
  837.